/*******************************************************************************
 * Copyright 2011 Towee.net
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package net.towee.model.group;

import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * This model contains information about group, such as group 
 * profile, unique group name and roles.
 * @author  viiv.c58@gmail.com (Artem Artem'ev)
 */
public interface GroupData extends IsSerializable {
	/**
	 * @return id of group
	 */
	String getId();

	/**
	 * @return identity of group
	 */
	GroupIdentity getIdentity();
	
	/**
	 * @return role container
	 */
	RoleContainer getRoleContainer();
	
	/**
	 * @return group profile
	 */
	GroupProfile getProfile();
		
	/**
	 * Set test question for new users
	 * @param quest
	 * @param answer TODO
	 */
	void setTestQuestion(String quest, String answer);
	
	/**
	 * @return test question
	 */
	String getTestQuestion();
	
	/**
	 * @return answer for test quest or null if user can't view this
	 * 		   field.
	 */
	String getTestAnswer();
	
	/**
	 * @return list of users who want to enter to group
	 */
	List<GroupEnterRequest> getEnterRequests();

	/**
	 * Set id of group. It set the same id for identity and profile
	 * @param string
	 */
	void setId(String string);
}